<template>
  <div class="index">
    <!-- 轮播图 -->
    <mu-carousel hide-controls>
      <mu-carousel-item v-for="(item, index) in picList" :key="index">
        <img :src="item.img" />
      </mu-carousel-item>
    </mu-carousel>

    <!-- 导航 -->
    <div class="supNav">
      <div class="item" @click="$router.push({ name: 'NewsList' })">
        <i class="iconfont icon-ziyuan80 a"></i>
        <p>新闻资讯</p>
      </div>
      <div class="item" @click="$router.push({ name: 'ImgList' })">
        <i class="iconfont icon-tupian1 b"></i>
        <p>图片分享</p>
      </div>
      <div class="item" @click="$router.push({ name: 'GoodsList' })">
        <i class="iconfont icon-shangpin c"></i>
        <p>商品展示</p>
      </div>
      <div class="item">
        <i class="iconfont icon-component d"></i>
        <p>留言反馈</p>
      </div>
      <div class="item">
        <i class="iconfont icon-zixun e"></i>
        <p>搜索资讯</p>
      </div>
      <div class="item">
        <i class="iconfont icon-lianxiren f"></i>
        <p>联系我们</p>
      </div>
    </div>
  </div>
</template>

<script>
import { getLunBo } from "@/apis/myindex";

export default {
  data() {
    return {
      picList: [],
    };
  },
  async mounted() {
    this.picList = (await getLunBo()).data.message;
    // console.log(this.picList);
  },
  methods: {},
};
</script>

<style lang="less" scoped>
@import url("//at.alicdn.com/t/font_2416172_ltqpxr6hd3c.css");
.index {
  height: 100%;
  // padding-top: 39px;
}
.mu-carousel {
  height: 200/375 * 100vw;
  .mu-carousel-item img {
    height: 100%;
    width: 100%;
    top: 45%;
  }
  .mu-carousel-indicators {
    height: 0px;
  }
}
.supNav {
  width: 100%;
  height: 170/375 * 100vw;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin-top: 10/375 * 100vw;
  .item {
    width: 100/375 * 100vw;
    height: 80/375 * 100vw;
    text-align: center;
    margin-bottom: 20/375 * 100vw;
    i {
      display: inline-block;
      height: 50/375 * 100vw;
      width: 50/375 * 100vw;
      line-height: 50/375 * 100vw;
      font-size: 28/375 * 100vw;
      border-radius: 50%;
      margin-bottom: 10/375 * 100vw;
      color: white;
    }
    p {
      font-weight: 700;
    }
  }
  .a {
    background-color: seagreen;
  }
  .b {
    background-color: rgb(230, 49, 49);
  }
  .c {
    background-color: rgb(64, 64, 240);
  }
  .d {
    background-color: skyblue;
  }
  .e {
    background-color: tomato;
  }
  .f {
    background-color: orangered;
  }
}
</style>